library(ggplot2)
library(dplyr)##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(tidyverse)## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ tibble 3.1.0 ✓ purrr 0.3.4
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(arsenal)
library(data.table)##
## Attaching package: 'data.table'
## The following object is masked from 'package:purrr':
##
## transpose
## The following objects are masked from 'package:dplyr':
##
## between, first, last
library(expss)##
## Attaching package: 'expss'
## The following objects are masked from 'package:data.table':
##
## copy, like
## The following objects are masked from 'package:stringr':
##
## fixed, regex
## The following objects are masked from 'package:purrr':
##
## keep, modify, modify_if, transpose, when
## The following objects are masked from 'package:tidyr':
##
## contains, nest
## The following objects are masked from 'package:dplyr':
##
## between, compute, contains, first, last, na_if, recode, vars
## The following object is masked from 'package:ggplot2':
##
## vars
library(ggsci)
#ideas, stratify by what do you consider a good nights sleep
#additive index according to behaviors
#regression models for the outcome.
#Positive quality of sleep -
#Consistent wake up
#Greater than 7 hrs to 9 hrs --> stratify #for sure USE THIS AND ONE OR THE OTHER
#Agreement questions Q44
#Current bedtime routines
#Current lifestyle habits
#Employment and childrenanalysisdata <- readRDS("foranalysis.rds")#Binary variable for seven or nine weighted as 1
#analysisdata <- analysisdata %>% mutate(
# sevenornine = case_when(
# Q10_workdayhoursofsleep >= 7.0 & Q10_workdayhoursofsleep <= 9.0 ~ 1,
# Q10_workdayhoursofsleep < 7.0 | Q10_workdayhoursofsleep > 9.0 ~ 0,
# is.na(Q10_workdayhoursofsleep) ~ NA_real_
# ))
analysisdata <- analysisdata %>% mutate(
sevenornine = case_when(
Q10_workdayhoursofsleep >= 7.0 & Q10_workdayhoursofsleep <= 9.0 ~ 2,
Q10_workdayhoursofsleep < 7.0 | Q10_workdayhoursofsleep > 9.0 ~ 0,
is.na(Q10_workdayhoursofsleep) ~ NA_real_
))
#Binary variable for quality of sleep weighted as 1
analysisdata <- analysisdata %>% mutate(
quality = case_when(
Q44_6_ifeelpositiveaboutthequalityofmysleep == "Somewhat agree" ~ 1,
Q44_6_ifeelpositiveaboutthequalityofmysleep == "Strongly agree" ~ 1,
is.na(Q44_6_ifeelpositiveaboutthequalityofmysleep) ~ NA_real_,
TRUE ~ 0))
#Binary variable for consistency of wake up weighted as 1
analysisdata <- analysisdata %>% mutate(
consistency = case_when(
Q13_consistentwakeup == "Yes" ~ 1,
is.na(Q13_consistentwakeup) ~ NA_real_,
TRUE ~ 0))
#Compositescore computation
analysisdata <- analysisdata %>% mutate(
compositescore = sevenornine + quality + consistency
)
#analysisdata <- analysisdata %>% mutate(compositeoutcomegoodsleep = factor(compositescore, label = c("score 0 - worst sleep", "score 1", "score 2", "score 3 - best sleep"))) %>%
# filter(!is.na(compositescore))
analysisdata <- analysisdata %>% mutate(compositeoutcomegoodsleep = factor(compositescore, label = c("score 0 - worst sleep", "score 1", "score 2", "score 3", "score 4 - best sleep"))) %>%
filter(!is.na(compositescore))
# analysisdata <- analysisdata %>% mutate(compositeoutcomegoodsleep = factor(compositescore, label = c("score 0", "score 1", "score 2", "score 3"))) %>%
# filter(!is.na(compositescore))
#Logistic regression just input demographic variables, then add pyschosocial variables and see how that affects model statistics. Sequential adjustment.
#Cut it in different places.
#Split between 2 and 3 , and 3 and 4
#Cumulative score how many ones do you get
#hours of sleep (7-9) vs. outside of (7-9) --> either interim category
#quality of sleep (1) sometimes or (0)
#consistent wakeup (1) sometimes/no (0)tab1 <- tableby(compositeoutcomegoodsleep~ Q3_role +
Q4_gender +
Q5_age +
Q6_numberinhousehold +
Q37_employed +
Q8_diagnosis +
Q10_workdayhoursofsleep +
Q11_weekendhoursofsleep +
Q9_howoftensleepy,
data=analysisdata, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 1. Baseline information', pfootnote=TRUE, digits = 2)| score 0 - worst sleep (N=27) | score 1 (N=35) | score 2 (N=36) | score 3 (N=47) | score 4 - best sleep (N=53) | Total (N=198) | p value | |
|---|---|---|---|---|---|---|---|
| What is your role at Bloomberg | 0.6211 | ||||||
| Â Â Â Faculty/Staff Member | 0 (0.0%) | 2 (5.7%) | 1 (2.8%) | 1 (2.1%) | 1 (1.9%) | 5 (2.5%) | |
| Â Â Â Full-time student | 21 (77.8%) | 20 (57.1%) | 28 (77.8%) | 31 (66.0%) | 37 (69.8%) | 137 (69.2%) | |
| Â Â Â Part-time student | 6 (22.2%) | 13 (37.1%) | 7 (19.4%) | 15 (31.9%) | 15 (28.3%) | 56 (28.3%) | |
| What gender do you identify as? | 0.2511 | ||||||
| Â Â Â Female | 21 (77.8%) | 25 (71.4%) | 26 (72.2%) | 40 (85.1%) | 46 (86.8%) | 158 (79.8%) | |
| Â Â Â Male | 4 (14.8%) | 8 (22.9%) | 9 (25.0%) | 7 (14.9%) | 7 (13.2%) | 35 (17.7%) | |
| Â Â Â Non-binary / third gender | 1 (3.7%) | 2 (5.7%) | 1 (2.8%) | 0 (0.0%) | 0 (0.0%) | 4 (2.0%) | |
| Â Â Â Prefer not to say | 1 (3.7%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (0.5%) | |
| How old are you? | 0.2552 | ||||||
| Â Â Â Median (Q1, Q3) | 26.50 (25.00, 29.75) | 30.00 (26.00, 36.00) | 27.00 (24.00, 30.00) | 29.00 (26.00, 31.00) | 28.00 (24.00, 32.00) | 28.00 (25.00, 32.00) | |
| How many people live in your household, including yourself? | 0.2032 | ||||||
| Â Â Â Median (Q1, Q3) | 2.00 (1.00, 3.00) | 3.00 (2.00, 3.00) | 2.00 (2.00, 3.00) | 2.00 (2.00, 3.00) | 2.00 (2.00, 3.00) | 2.00 (2.00, 3.00) | |
| Are you currently employed outside of your education program? | 0.6791 | ||||||
| Â Â Â N-Miss | 0 | 0 | 1 | 0 | 0 | 1 | |
| Â Â Â No | 13 (48.1%) | 17 (48.6%) | 19 (54.3%) | 18 (38.3%) | 26 (49.1%) | 93 (47.2%) | |
| Â Â Â Yes | 14 (51.9%) | 18 (51.4%) | 16 (45.7%) | 29 (61.7%) | 27 (50.9%) | 104 (52.8%) | |
| Have you ever been diagnosed with any of the following sleep disorders? | 0.6031 | ||||||
| Â Â Â Insomnia | 3 (11.1%) | 1 (2.9%) | 3 (8.3%) | 4 (8.5%) | 1 (1.9%) | 12 (6.1%) | |
| Â Â Â No | 24 (88.9%) | 32 (91.4%) | 30 (83.3%) | 43 (91.5%) | 50 (94.3%) | 179 (90.4%) | |
| Â Â Â Other | 0 (0.0%) | 1 (2.9%) | 1 (2.8%) | 0 (0.0%) | 1 (1.9%) | 3 (1.5%) | |
| Â Â Â Sleep Apnea | 0 (0.0%) | 1 (2.9%) | 2 (5.6%) | 0 (0.0%) | 1 (1.9%) | 4 (2.0%) | |
| During the past 5 workdays, how many hours of sleep did you get per night on average? | < 0.0012 | ||||||
| Â Â Â Median (Q1, Q3) | 6.00 (5.00, 6.00) | 6.00 (5.00, 6.00) | 7.00 (7.00, 7.50) | 7.00 (7.00, 8.00) | 7.00 (7.00, 8.00) | 7.00 (6.00, 7.50) | |
| During the past weekend, how many hours of sleep did you get per night on average? | < 0.0012 | ||||||
| Â Â Â Median (Q1, Q3) | 7.00 (6.25, 9.00) | 7.00 (6.00, 8.00) | 8.00 (7.15, 8.75) | 8.00 (7.75, 9.00) | 8.00 (7.50, 9.00) | 8.00 (7.00, 9.00) | |
| How often do you feel sleepy during the day? | |||||||
| Â Â Â N-Miss | 13 | 13 | 17 | 17 | 4 | 64 | |
| Â Â Â Never | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 2 (6.7%) | 0 (0.0%) | 2 (1.5%) | |
| Â Â Â Rarely | 1 (7.1%) | 5 (22.7%) | 1 (5.3%) | 6 (20.0%) | 12 (24.5%) | 25 (18.7%) | |
| Â Â Â Sometimes | 9 (64.3%) | 13 (59.1%) | 18 (94.7%) | 20 (66.7%) | 36 (73.5%) | 96 (71.6%) | |
| Â Â Â Very often | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â Always | 4 (28.6%) | 4 (18.2%) | 0 (0.0%) | 2 (6.7%) | 1 (2.0%) | 11 (8.2%) |
#If student
student <- analysisdata %>% filter(Q3_role != "Faculty/Staff Member")
tab1 <- tableby(compositeoutcomegoodsleep~ Q2_program,
data=student, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 1. Baseline information', pfootnote=TRUE, digits = 2)| score 0 - worst sleep (N=27) | score 1 (N=33) | score 2 (N=35) | score 3 (N=46) | score 4 - best sleep (N=52) | Total (N=193) | p value | |
|---|---|---|---|---|---|---|---|
| What is your current program at Bloomberg? | 0.2671 | ||||||
| Â Â Â Doctoral Student | 4 (14.8%) | 9 (27.3%) | 6 (17.1%) | 17 (37.0%) | 16 (30.8%) | 52 (26.9%) | |
| Â Â Â Masters Student | 23 (85.2%) | 22 (66.7%) | 27 (77.1%) | 28 (60.9%) | 35 (67.3%) | 135 (69.9%) | |
| Â Â Â Other | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (2.2%) | 0 (0.0%) | 1 (0.5%) | |
| Â Â Â Post doctoral student | 0 (0.0%) | 2 (6.1%) | 2 (5.7%) | 0 (0.0%) | 1 (1.9%) | 5 (2.6%) |
#If employed
employed <- analysisdata %>% filter(Q37_employed == "Yes")
tab1 <- tableby(compositeoutcomegoodsleep ~ Q38_wfh,
data=employed, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 1. Baseline information', pfootnote=TRUE, digits = 2)| score 0 - worst sleep (N=14) | score 1 (N=18) | score 2 (N=16) | score 3 (N=29) | score 4 - best sleep (N=27) | Total (N=104) | p value | |
|---|---|---|---|---|---|---|---|
| Do you work from home? | 0.8011 | ||||||
| Â Â Â No | 4 (28.6%) | 7 (38.9%) | 4 (25.0%) | 9 (31.0%) | 6 (22.2%) | 30 (28.8%) | |
| Â Â Â Yes | 10 (71.4%) | 11 (61.1%) | 12 (75.0%) | 20 (69.0%) | 21 (77.8%) | 74 (71.2%) |
#If wfh
notworkfromhome <- analysisdata %>% filter(Q37_employed == "Yes" & Q38_wfh == "No")
tab1 <- tableby(compositeoutcomegoodsleep ~ Q39_dayornight,
data=notworkfromhome, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 1. Baseline information', pfootnote=TRUE, digits = 2)| score 0 - worst sleep (N=4) | score 1 (N=7) | score 2 (N=4) | score 3 (N=9) | score 4 - best sleep (N=6) | Total (N=30) | p value | |
|---|---|---|---|---|---|---|---|
| Do you work day or night shifts? | 0.0671 | ||||||
| Â Â Â N-Miss | 0 | 0 | 0 | 1 | 0 | 1 | |
| Â Â Â Day shift | 2 (50.0%) | 7 (100.0%) | 4 (100.0%) | 7 (87.5%) | 6 (100.0%) | 26 (89.7%) | |
| Â Â Â Night shift | 2 (50.0%) | 0 (0.0%) | 0 (0.0%) | 1 (12.5%) | 0 (0.0%) | 3 (10.3%) |
tab1 <- tableby(compositeoutcomegoodsleep~
Q15_consistentbedtimeonweekdays +
Q49_sleepqualitychangecovid +
bedtimeroutine +
Q19_howmanyhourssdidyouuseascreen +
as.numeric(Q19_howmanyhourssdidyouuseascreen) +
Q12_1_howmanynightsusescreen +
Q17_stressedaboutschool +
cantsleepfeeling +
Q18_howoftenpracticemindfullness +
behaviors +
Q44_1_thingsidointhelasthourbeforesleepaffectthequalityofmysleep +
Q44_2_gettingagoodnightssleepisimportantome +
Q44_3_mostofmyfriendshaveahealthysleeproutine +
Q44_4_lackofsleepaffectsmyacademicperformance +
Q44_5_havingaregularsleeproutineimprovesmentalclariy +
Q44_7_ithinkcuttingoutscreenuseonehourbeforesleepleadstobettersleep +
Q44_8_ithinkingworkingoutregularlyleadstobettersleep +
Q44_9_ithinkmeditatingbeforesleephelpsquality +
Q59_1_icanmaintainhealthysleephabits +
Q59_2_icancutoutscreenuseonehourbeforesleep +
Q59_3_icanworkoutregularly +
Q59_4_icanmediatebeforebed +
Q37_whatdoyouconsideragoodnightssleep +
Q50_1_energyfordailyacitivites +
Q50_2_attractivness +
Q50_3_productivity +
Q50_4_accomplishmentofotherdailygoals +
Q50_5_mentalandemotionalwellbeing +
Q50_6_fosteringmaintaingrelationships +
Q50_7_caringforchildren +
Q53_1_getoutsidefor10mininthemorning +
Q53_2_exerciseduringtheday +
Q53_3_doingabreathingexercisebeforesleep +
Q53_4_notusescreens +
Q53_5_listeningtoacalmingaudiobookorpodcast +
information,
data=analysisdata, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 2. Sleep questions', pfootnote=TRUE, digits = 2)| score 0 - worst sleep (N=27) | score 1 (N=35) | score 2 (N=36) | score 3 (N=47) | score 4 - best sleep (N=53) | Total (N=198) | p value | |
|---|---|---|---|---|---|---|---|
| Do you have a consistent time you wake up on weekdays? | < 0.0011 | ||||||
| Â Â Â No | 24 (88.9%) | 19 (54.3%) | 20 (55.6%) | 17 (36.2%) | 5 (9.4%) | 85 (42.9%) | |
| Â Â Â Sometimes | 3 (11.1%) | 7 (20.0%) | 9 (25.0%) | 14 (29.8%) | 14 (26.4%) | 47 (23.7%) | |
| Â Â Â Yes | 0 (0.0%) | 9 (25.7%) | 7 (19.4%) | 16 (34.0%) | 34 (64.2%) | 66 (33.3%) | |
| Has your sleep quality changed due to the COVID-19 pandemic? | 0.0031 | ||||||
| Â Â Â N-Miss | 0 | 1 | 0 | 1 | 0 | 2 | |
| Â Â Â No | 5 (18.5%) | 13 (38.2%) | 13 (36.1%) | 12 (26.1%) | 27 (50.9%) | 70 (35.7%) | |
| Â Â Â Yes, I feel my sleep quality has improved | 1 (3.7%) | 2 (5.9%) | 3 (8.3%) | 11 (23.9%) | 9 (17.0%) | 26 (13.3%) | |
| Â Â Â Yes, I feel my sleep quality has worsened | 21 (77.8%) | 19 (55.9%) | 20 (55.6%) | 23 (50.0%) | 17 (32.1%) | 100 (51.0%) | |
| My bedtime routine includes: | 0.5911 | ||||||
| Â Â Â N-Miss | 0 | 0 | 1 | 0 | 0 | 1 | |
| Â Â Â Brushing teeth | 8 (29.6%) | 10 (28.6%) | 14 (40.0%) | 16 (34.0%) | 15 (28.3%) | 63 (32.0%) | |
| Â Â Â Phone usage | 1 (3.7%) | 1 (2.9%) | 3 (8.6%) | 3 (6.4%) | 1 (1.9%) | 9 (4.6%) | |
| Â Â Â Reading | 1 (3.7%) | 3 (8.6%) | 0 (0.0%) | 0 (0.0%) | 1 (1.9%) | 5 (2.5%) | |
| Â Â Â Showering | 0 (0.0%) | 1 (2.9%) | 0 (0.0%) | 0 (0.0%) | 1 (1.9%) | 2 (1.0%) | |
| Â Â Â Washing my face | 16 (59.3%) | 20 (57.1%) | 18 (51.4%) | 28 (59.6%) | 34 (64.2%) | 116 (58.9%) | |
| Â Â Â Watching TV | 1 (3.7%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (1.9%) | 2 (1.0%) | |
| How many hours per day do you typically use a screen? (i.e. cell phone, tablet, computer, television) | |||||||
| Â Â Â N-Miss | 2 | 0 | 0 | 1 | 0 | 3 | |
| Â Â Â 0 | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â 1 | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â 2 | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â 3 | 0 (0.0%) | 1 (2.9%) | 0 (0.0%) | 2 (4.3%) | 0 (0.0%) | 3 (1.5%) | |
| Â Â Â 4 | 1 (4.0%) | 0 (0.0%) | 1 (2.8%) | 2 (4.3%) | 1 (1.9%) | 5 (2.6%) | |
| Â Â Â 5 | 0 (0.0%) | 0 (0.0%) | 3 (8.3%) | 0 (0.0%) | 2 (3.8%) | 5 (2.6%) | |
| Â Â Â 6 | 1 (4.0%) | 3 (8.6%) | 1 (2.8%) | 2 (4.3%) | 2 (3.8%) | 9 (4.6%) | |
| Â Â Â 7 | 1 (4.0%) | 1 (2.9%) | 1 (2.8%) | 0 (0.0%) | 2 (3.8%) | 5 (2.6%) | |
| Â Â Â 8 | 2 (8.0%) | 5 (14.3%) | 9 (25.0%) | 3 (6.5%) | 7 (13.2%) | 26 (13.3%) | |
| Â Â Â 9 | 2 (8.0%) | 1 (2.9%) | 0 (0.0%) | 3 (6.5%) | 4 (7.5%) | 10 (5.1%) | |
| Â Â Â 10 | 7 (28.0%) | 7 (20.0%) | 10 (27.8%) | 12 (26.1%) | 19 (35.8%) | 55 (28.2%) | |
| Â Â Â 11 | 0 (0.0%) | 2 (5.7%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 2 (1.0%) | |
| Â Â Â 12 | 5 (20.0%) | 10 (28.6%) | 6 (16.7%) | 17 (37.0%) | 11 (20.8%) | 49 (25.1%) | |
| Â Â Â 13 | 0 (0.0%) | 1 (2.9%) | 1 (2.8%) | 1 (2.2%) | 1 (1.9%) | 4 (2.1%) | |
| Â Â Â 14 | 3 (12.0%) | 3 (8.6%) | 1 (2.8%) | 3 (6.5%) | 3 (5.7%) | 13 (6.7%) | |
| Â Â Â 15 | 2 (8.0%) | 1 (2.9%) | 2 (5.6%) | 0 (0.0%) | 0 (0.0%) | 5 (2.6%) | |
| Â Â Â 16 | 1 (4.0%) | 0 (0.0%) | 0 (0.0%) | 1 (2.2%) | 1 (1.9%) | 3 (1.5%) | |
| Â Â Â 17 | 0 (0.0%) | 0 (0.0%) | 1 (2.8%) | 0 (0.0%) | 0 (0.0%) | 1 (0.5%) | |
| How many hours per day do you typically use a screen? (i.e. cell phone, tablet, computer, television) | 0.4382 | ||||||
| Â Â Â Median (Q1, Q3) | 11.00 (10.00, 13.00) | 11.00 (9.00, 13.00) | 11.00 (9.00, 13.00) | 11.00 (10.25, 13.00) | 11.00 (9.00, 13.00) | 11.00 (9.00, 13.00) | |
| In the past week, how many nights did you use screens (i.e. cell phone, tablet, computer, television) within 1 hour before bed? | 0.0452 | ||||||
| Â Â Â Median (Q1, Q3) | 7.00 (7.00, 7.00) | 7.00 (7.00, 7.00) | 7.00 (6.00, 7.00) | 7.00 (7.00, 7.00) | 7.00 (5.00, 7.00) | 7.00 (7.00, 7.00) | |
| How stressed do you currently feel about school? | 0.0962 | ||||||
| Â Â Â Median (Q1, Q3) | 7.00 (7.00, 8.50) | 7.00 (6.00, 9.00) | 7.00 (5.00, 8.00) | 7.00 (6.00, 8.00) | 7.00 (4.00, 8.00) | 7.00 (5.75, 8.00) | |
| When you can’t sleep do you feel | 0.1241 | ||||||
| Â Â Â Angry | 1 (3.7%) | 1 (2.9%) | 1 (2.8%) | 5 (10.6%) | 3 (5.7%) | 11 (5.6%) | |
| Â Â Â Frustrated | 12 (44.4%) | 16 (45.7%) | 18 (50.0%) | 23 (48.9%) | 31 (58.5%) | 100 (50.5%) | |
| Â Â Â Guilty | 9 (33.3%) | 5 (14.3%) | 9 (25.0%) | 5 (10.6%) | 6 (11.3%) | 34 (17.2%) | |
| Â Â Â None of the above | 0 (0.0%) | 4 (11.4%) | 2 (5.6%) | 3 (6.4%) | 4 (7.5%) | 13 (6.6%) | |
| Â Â Â Other | 0 (0.0%) | 4 (11.4%) | 1 (2.8%) | 4 (8.5%) | 1 (1.9%) | 10 (5.1%) | |
| Â Â Â Sad | 2 (7.4%) | 1 (2.9%) | 3 (8.3%) | 0 (0.0%) | 0 (0.0%) | 6 (3.0%) | |
| Â Â Â Stressed | 3 (11.1%) | 4 (11.4%) | 2 (5.6%) | 7 (14.9%) | 8 (15.1%) | 24 (12.1%) | |
| How often do you practice mindfulness techniques? (i.e. breathing exercises, meditation, etc.,) | |||||||
| Â Â Â N-Miss | 2 | 4 | 2 | 4 | 6 | 18 | |
| Â Â Â Never | 3 (12.0%) | 6 (19.4%) | 4 (11.8%) | 7 (16.3%) | 13 (27.7%) | 33 (18.3%) | |
| Â Â Â Rarely | 15 (60.0%) | 14 (45.2%) | 12 (35.3%) | 16 (37.2%) | 16 (34.0%) | 73 (40.6%) | |
| Â Â Â Sometimes | 7 (28.0%) | 11 (35.5%) | 16 (47.1%) | 19 (44.2%) | 17 (36.2%) | 70 (38.9%) | |
| Â Â Â Very often | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â Always | 0 (0.0%) | 0 (0.0%) | 2 (5.9%) | 1 (2.3%) | 1 (2.1%) | 4 (2.2%) | |
| Which of the following behaviors do you participate in? | 0.2101 | ||||||
| Â Â Â N-Miss | 0 | 1 | 0 | 0 | 1 | 2 | |
| Â Â Â Alcohol Consumption | 11 (40.7%) | 9 (26.5%) | 19 (52.8%) | 28 (59.6%) | 28 (53.8%) | 95 (48.5%) | |
| Â Â Â Cigarette smoking | 1 (3.7%) | 2 (5.9%) | 0 (0.0%) | 1 (2.1%) | 0 (0.0%) | 4 (2.0%) | |
| Â Â Â Daytime napping | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (1.9%) | 1 (0.5%) | |
| Â Â Â Drinking Caffeinated beverages | 1 (3.7%) | 1 (2.9%) | 0 (0.0%) | 0 (0.0%) | 2 (3.8%) | 4 (2.0%) | |
| Â Â Â Exercise | 8 (29.6%) | 16 (47.1%) | 11 (30.6%) | 13 (27.7%) | 19 (36.5%) | 67 (34.2%) | |
| Â Â Â Social Media Use | 6 (22.2%) | 6 (17.6%) | 6 (16.7%) | 5 (10.6%) | 2 (3.8%) | 25 (12.8%) | |
| The things I do in the last hour before bed affect the quality of my sleep. | 0.6651 | ||||||
| Â Â Â Strongly disagree | 0 (0.0%) | 2 (5.7%) | 2 (5.6%) | 1 (2.1%) | 1 (1.9%) | 6 (3.0%) | |
| Â Â Â Somewhat disagree | 2 (7.4%) | 3 (8.6%) | 1 (2.8%) | 3 (6.4%) | 4 (7.5%) | 13 (6.6%) | |
| Â Â Â Neither agree nor disagree | 2 (7.4%) | 6 (17.1%) | 2 (5.6%) | 5 (10.6%) | 3 (5.7%) | 18 (9.1%) | |
| Â Â Â Somewhat agree | 10 (37.0%) | 17 (48.6%) | 19 (52.8%) | 20 (42.6%) | 28 (52.8%) | 94 (47.5%) | |
| Â Â Â Strongly agree | 13 (48.1%) | 7 (20.0%) | 12 (33.3%) | 18 (38.3%) | 17 (32.1%) | 67 (33.8%) | |
| Getting a good night’s sleep is important to me. | 0.0181 | ||||||
| Â Â Â Strongly disagree | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (2.1%) | 0 (0.0%) | 1 (0.5%) | |
| Â Â Â Somewhat disagree | 0 (0.0%) | 0 (0.0%) | 1 (2.8%) | 0 (0.0%) | 0 (0.0%) | 1 (0.5%) | |
| Â Â Â Neither agree nor disagree | 2 (7.4%) | 1 (2.9%) | 0 (0.0%) | 1 (2.1%) | 0 (0.0%) | 4 (2.0%) | |
| Â Â Â Somewhat agree | 10 (37.0%) | 5 (14.3%) | 4 (11.1%) | 4 (8.5%) | 4 (7.5%) | 27 (13.6%) | |
| Â Â Â Strongly agree | 15 (55.6%) | 29 (82.9%) | 31 (86.1%) | 41 (87.2%) | 49 (92.5%) | 165 (83.3%) | |
| Most of my friends have a healthy sleep routine. | 0.2261 | ||||||
| Â Â Â N-Miss | 0 | 1 | 0 | 0 | 0 | 1 | |
| Â Â Â Strongly disagree | 2 (7.4%) | 3 (8.8%) | 2 (5.6%) | 0 (0.0%) | 2 (3.8%) | 9 (4.6%) | |
| Â Â Â Somewhat disagree | 8 (29.6%) | 5 (14.7%) | 9 (25.0%) | 9 (19.1%) | 9 (17.0%) | 40 (20.3%) | |
| Â Â Â Neither agree nor disagree | 7 (25.9%) | 14 (41.2%) | 18 (50.0%) | 29 (61.7%) | 27 (50.9%) | 95 (48.2%) | |
| Â Â Â Somewhat agree | 6 (22.2%) | 10 (29.4%) | 7 (19.4%) | 7 (14.9%) | 12 (22.6%) | 42 (21.3%) | |
| Â Â Â Strongly agree | 4 (14.8%) | 2 (5.9%) | 0 (0.0%) | 2 (4.3%) | 3 (5.7%) | 11 (5.6%) | |
| Lack of sleep affects my academic performance. | 0.5391 | ||||||
| Â Â Â N-Miss | 0 | 1 | 0 | 0 | 0 | 1 | |
| Â Â Â Strongly disagree | 1 (3.7%) | 0 (0.0%) | 0 (0.0%) | 1 (2.1%) | 1 (1.9%) | 3 (1.5%) | |
| Â Â Â Somewhat disagree | 3 (11.1%) | 0 (0.0%) | 2 (5.6%) | 4 (8.5%) | 2 (3.8%) | 11 (5.6%) | |
| Â Â Â Neither agree nor disagree | 3 (11.1%) | 3 (8.8%) | 2 (5.6%) | 5 (10.6%) | 1 (1.9%) | 14 (7.1%) | |
| Â Â Â Somewhat agree | 8 (29.6%) | 16 (47.1%) | 16 (44.4%) | 21 (44.7%) | 19 (35.8%) | 80 (40.6%) | |
| Â Â Â Strongly agree | 12 (44.4%) | 15 (44.1%) | 16 (44.4%) | 16 (34.0%) | 30 (56.6%) | 89 (45.2%) | |
| Having a regular sleep routine improves mental clarity/sharpness. | |||||||
| Â Â Â Strongly disagree | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â Somewhat disagree | 0 (0.0%) | 0 (0.0%) | 1 (2.8%) | 0 (0.0%) | 0 (0.0%) | 1 (0.5%) | |
| Â Â Â Neither agree nor disagree | 2 (7.4%) | 2 (5.7%) | 1 (2.8%) | 4 (8.5%) | 1 (1.9%) | 10 (5.1%) | |
| Â Â Â Somewhat agree | 5 (18.5%) | 7 (20.0%) | 11 (30.6%) | 13 (27.7%) | 14 (26.4%) | 50 (25.3%) | |
| Â Â Â Strongly agree | 20 (74.1%) | 26 (74.3%) | 23 (63.9%) | 30 (63.8%) | 38 (71.7%) | 137 (69.2%) | |
| I think cutting out screen use 1 hour before bed leads to better sleep. | 0.7671 | ||||||
| Â Â Â Strongly disagree | 1 (3.7%) | 3 (8.6%) | 1 (2.8%) | 0 (0.0%) | 2 (3.8%) | 7 (3.5%) | |
| Â Â Â Somewhat disagree | 1 (3.7%) | 1 (2.9%) | 2 (5.6%) | 1 (2.1%) | 1 (1.9%) | 6 (3.0%) | |
| Â Â Â Neither agree nor disagree | 5 (18.5%) | 6 (17.1%) | 9 (25.0%) | 12 (25.5%) | 7 (13.2%) | 39 (19.7%) | |
| Â Â Â Somewhat agree | 9 (33.3%) | 17 (48.6%) | 13 (36.1%) | 21 (44.7%) | 23 (43.4%) | 83 (41.9%) | |
| Â Â Â Strongly agree | 11 (40.7%) | 8 (22.9%) | 11 (30.6%) | 13 (27.7%) | 20 (37.7%) | 63 (31.8%) | |
| I think working out regularly leads to better sleep. | |||||||
| Â Â Â Strongly disagree | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â Somewhat disagree | 1 (3.7%) | 0 (0.0%) | 2 (5.6%) | 0 (0.0%) | 0 (0.0%) | 3 (1.5%) | |
| Â Â Â Neither agree nor disagree | 1 (3.7%) | 3 (8.6%) | 4 (11.1%) | 6 (12.8%) | 3 (5.7%) | 17 (8.6%) | |
| Â Â Â Somewhat agree | 6 (22.2%) | 14 (40.0%) | 12 (33.3%) | 17 (36.2%) | 8 (15.1%) | 57 (28.8%) | |
| Â Â Â Strongly agree | 19 (70.4%) | 18 (51.4%) | 18 (50.0%) | 24 (51.1%) | 42 (79.2%) | 121 (61.1%) | |
| I think meditating before bed helps sleep quality. | 0.0751 | ||||||
| Â Â Â N-Miss | 0 | 0 | 0 | 1 | 0 | 1 | |
| Â Â Â Strongly disagree | 1 (3.7%) | 3 (8.6%) | 1 (2.8%) | 0 (0.0%) | 1 (1.9%) | 6 (3.0%) | |
| Â Â Â Somewhat disagree | 1 (3.7%) | 2 (5.7%) | 4 (11.1%) | 1 (2.2%) | 3 (5.7%) | 11 (5.6%) | |
| Â Â Â Neither agree nor disagree | 7 (25.9%) | 14 (40.0%) | 10 (27.8%) | 16 (34.8%) | 19 (35.8%) | 66 (33.5%) | |
| Â Â Â Somewhat agree | 5 (18.5%) | 13 (37.1%) | 13 (36.1%) | 20 (43.5%) | 14 (26.4%) | 65 (33.0%) | |
| Â Â Â Strongly agree | 13 (48.1%) | 3 (8.6%) | 8 (22.2%) | 9 (19.6%) | 16 (30.2%) | 49 (24.9%) | |
| I can maintain healthy sleep habits. | < 0.0011 | ||||||
| Â Â Â N-Miss | 0 | 0 | 1 | 0 | 0 | 1 | |
| Â Â Â Not at all confident | 7 (25.9%) | 1 (2.9%) | 4 (11.4%) | 2 (4.3%) | 0 (0.0%) | 14 (7.1%) | |
| Â Â Â Slightly confident | 10 (37.0%) | 8 (22.9%) | 5 (14.3%) | 5 (10.6%) | 0 (0.0%) | 28 (14.2%) | |
| Â Â Â Somewhat confident | 5 (18.5%) | 17 (48.6%) | 15 (42.9%) | 22 (46.8%) | 6 (11.3%) | 65 (33.0%) | |
| Â Â Â Pretty confident | 5 (18.5%) | 8 (22.9%) | 11 (31.4%) | 12 (25.5%) | 33 (62.3%) | 69 (35.0%) | |
| Â Â Â Extremely confident | 0 (0.0%) | 1 (2.9%) | 0 (0.0%) | 6 (12.8%) | 14 (26.4%) | 21 (10.7%) | |
| I can cut out screen use 1 hour before bed. | 0.0621 | ||||||
| Â Â Â N-Miss | 0 | 0 | 1 | 0 | 0 | 1 | |
| Â Â Â Not at all confident | 6 (22.2%) | 9 (25.7%) | 7 (20.0%) | 13 (27.7%) | 9 (17.0%) | 44 (22.3%) | |
| Â Â Â Slightly confident | 12 (44.4%) | 12 (34.3%) | 15 (42.9%) | 13 (27.7%) | 10 (18.9%) | 62 (31.5%) | |
| Â Â Â Somewhat confident | 5 (18.5%) | 7 (20.0%) | 9 (25.7%) | 11 (23.4%) | 18 (34.0%) | 50 (25.4%) | |
| Â Â Â Pretty confident | 1 (3.7%) | 4 (11.4%) | 4 (11.4%) | 10 (21.3%) | 8 (15.1%) | 27 (13.7%) | |
| Â Â Â Extremely confident | 3 (11.1%) | 3 (8.6%) | 0 (0.0%) | 0 (0.0%) | 8 (15.1%) | 14 (7.1%) | |
| I can work out regularly. | 0.1721 | ||||||
| Â Â Â N-Miss | 1 | 0 | 1 | 0 | 0 | 2 | |
| Â Â Â Not at all confident | 5 (19.2%) | 4 (11.4%) | 3 (8.6%) | 2 (4.3%) | 1 (1.9%) | 15 (7.7%) | |
| Â Â Â Slightly confident | 8 (30.8%) | 6 (17.1%) | 5 (14.3%) | 11 (23.4%) | 7 (13.2%) | 37 (18.9%) | |
| Â Â Â Somewhat confident | 4 (15.4%) | 6 (17.1%) | 7 (20.0%) | 10 (21.3%) | 11 (20.8%) | 38 (19.4%) | |
| Â Â Â Pretty confident | 6 (23.1%) | 9 (25.7%) | 12 (34.3%) | 11 (23.4%) | 11 (20.8%) | 49 (25.0%) | |
| Â Â Â Extremely confident | 3 (11.5%) | 10 (28.6%) | 8 (22.9%) | 13 (27.7%) | 23 (43.4%) | 57 (29.1%) | |
| I can meditate before bed. | 0.0931 | ||||||
| Â Â Â N-Miss | 0 | 0 | 1 | 0 | 0 | 1 | |
| Â Â Â Not at all confident | 8 (29.6%) | 4 (11.4%) | 9 (25.7%) | 10 (21.3%) | 13 (24.5%) | 44 (22.3%) | |
| Â Â Â Slightly confident | 7 (25.9%) | 10 (28.6%) | 11 (31.4%) | 12 (25.5%) | 11 (20.8%) | 51 (25.9%) | |
| Â Â Â Somewhat confident | 5 (18.5%) | 18 (51.4%) | 3 (8.6%) | 12 (25.5%) | 16 (30.2%) | 54 (27.4%) | |
| Â Â Â Pretty confident | 3 (11.1%) | 2 (5.7%) | 8 (22.9%) | 9 (19.1%) | 9 (17.0%) | 31 (15.7%) | |
| Â Â Â Extremely confident | 4 (14.8%) | 1 (2.9%) | 4 (11.4%) | 4 (8.5%) | 4 (7.5%) | 17 (8.6%) | |
| What do you consider a good night’s sleep? | 0.0101 | ||||||
| Â Â Â 10+ hours | 0 (0.0%) | 1 (2.9%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (0.5%) | |
| Â Â Â 7 hours | 7 (25.9%) | 8 (22.9%) | 2 (5.6%) | 3 (6.4%) | 7 (13.2%) | 27 (13.6%) | |
| Â Â Â 8 hours | 16 (59.3%) | 25 (71.4%) | 22 (61.1%) | 35 (74.5%) | 39 (73.6%) | 137 (69.2%) | |
| Â Â Â 9 hours | 3 (11.1%) | 1 (2.9%) | 12 (33.3%) | 9 (19.1%) | 7 (13.2%) | 32 (16.2%) | |
| Â Â Â Less than or equal to 6 hours | 1 (3.7%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | 1 (0.5%) | |
| Energy for daily activities | 0.6652 | ||||||
| Â Â Â Median (Q1, Q3) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (5.00, 5.00) | 5.00 (4.00, 5.00) | |
| Attractiveness (to self & others) | 0.3932 | ||||||
| Â Â Â Median (Q1, Q3) | 3.00 (3.00, 4.00) | 4.00 (3.00, 4.00) | 3.50 (2.00, 4.00) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | |
| Productivity at work/school | 0.4212 | ||||||
| Â Â Â Median (Q1, Q3) | 5.00 (5.00, 5.00) | 5.00 (4.25, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.50, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | |
| Accomplishment of other daily goals (e.g. exercise, cooking, paying bills, etc) | 0.6482 | ||||||
| Â Â Â Median (Q1, Q3) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 4.50 (4.00, 5.00) | 4.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | |
| Mental and emotional wellbeing | 0.6812 | ||||||
| Â Â Â Median (Q1, Q3) | 5.00 (4.50, 5.00) | 5.00 (4.25, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | |
| Fostering/maintaining relationships | 0.4622 | ||||||
| Â Â Â Median (Q1, Q3) | 4.00 (4.00, 5.00) | 4.00 (4.00, 5.00) | 4.00 (3.00, 4.25) | 4.00 (3.00, 5.00) | 4.00 (3.00, 5.00) | 4.00 (3.00, 5.00) | |
| Caring for children | 0.4842 | ||||||
| Â Â Â Median (Q1, Q3) | 1.00 (1.00, 3.00) | 2.00 (1.00, 4.00) | 1.00 (1.00, 3.00) | 1.00 (1.00, 3.50) | 1.00 (1.00, 3.75) | 1.00 (1.00, 3.00) | |
| Get outside for 10 minutes in the morning. | 0.4452 | ||||||
| Â Â Â Median (Q1, Q3) | 4.00 (2.00, 4.00) | 4.00 (2.25, 5.00) | 4.00 (2.75, 5.00) | 4.00 (2.00, 5.00) | 4.00 (2.00, 5.00) | 4.00 (2.00, 5.00) | |
| Exercise during the day. | 0.0202 | ||||||
| Â Â Â Median (Q1, Q3) | 4.00 (3.00, 4.00) | 4.00 (3.00, 5.00) | 4.00 (3.00, 5.00) | 4.00 (3.00, 5.00) | 5.00 (4.00, 5.00) | 4.00 (3.00, 5.00) | |
| Do a breathing exercise before you sleep. | 0.7592 | ||||||
| Â Â Â Median (Q1, Q3) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.25) | 3.00 (2.00, 5.00) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | |
| Not use screens (i.e. cell phone, tablet, computer, television) for 1 hour before bed | 0.0042 | ||||||
| Â Â Â Median (Q1, Q3) | 2.00 (1.00, 2.50) | 2.00 (2.00, 3.00) | 2.00 (1.75, 3.00) | 2.00 (2.00, 3.00) | 3.00 (2.00, 4.00) | 2.00 (2.00, 3.00) | |
| Listen to a calming audiobook or podcast before bed | 0.7612 | ||||||
| Â Â Â Median (Q1, Q3) | 3.00 (1.00, 4.50) | 3.00 (2.00, 4.00) | 3.00 (2.00, 3.25) | 3.00 (2.00, 4.00) | 2.00 (1.00, 4.00) | 3.00 (2.00, 4.00) | |
| Where have you seen or received information about sleep quality or sleep hygiene? | 0.0091 | ||||||
| Â Â Â N-Miss | 1 | 4 | 2 | 2 | 6 | 15 | |
| Â Â Â Friends | 0 (0.0%) | 0 (0.0%) | 1 (2.9%) | 5 (11.1%) | 2 (4.3%) | 8 (4.4%) | |
| Â Â Â Health care professional | 10 (38.5%) | 16 (51.6%) | 15 (44.1%) | 18 (40.0%) | 11 (23.4%) | 70 (38.3%) | |
| Â Â Â News sources | 0 (0.0%) | 3 (9.7%) | 2 (5.9%) | 1 (2.2%) | 6 (12.8%) | 12 (6.6%) | |
| Â Â Â Other online source | 4 (15.4%) | 3 (9.7%) | 5 (14.7%) | 4 (8.9%) | 8 (17.0%) | 24 (13.1%) | |
| Â Â Â Social media | 5 (19.2%) | 7 (22.6%) | 10 (29.4%) | 16 (35.6%) | 17 (36.2%) | 55 (30.1%) | |
| Â Â Â University wellbeing resources | 7 (26.9%) | 2 (6.5%) | 1 (2.9%) | 1 (2.2%) | 3 (6.4%) | 14 (7.7%) |
Fig 1
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q3_role, fill=compositeoutcomegoodsleep)) +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Role") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 2
g<- ggplot(student) +
geom_bar(aes(x=Q2_program, fill=compositeoutcomegoodsleep)) +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "What is your current program at Bloomberg?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 3
g<- ggplot(student) +
geom_bar(aes(x=Q4_gender, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "What gender do you identify as?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 4
g<- ggplot(student) +
geom_bar(aes(x=Q37_employed, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Are you currently employed outside of your education program?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 5
g<- ggplot(employed) +
geom_bar(aes(x=Q38_wfh, fill=compositeoutcomegoodsleep)) +
coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Do you work from home?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 6
g<- ggplot(notworkfromhome) +
geom_bar(aes(x=Q39_dayornight, fill=compositeoutcomegoodsleep)) +
coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Do you work day or night shifts?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 7
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q7_children, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=15)) +
labs(title = "Are there children living in your household?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 8
g<-ggplot(analysisdata) +
geom_bar(aes(x=Q8_diagnosis, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=20), axis.text.x = element_text(size=32)) +
labs(title = "Have you ever been diagnosed with any of the following sleep disorders?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 9
g<-ggplot(analysisdata) +
geom_bar(aes(x=Q9_howoftensleepy, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "How often do you feel sleepy during the day?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 10
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q13_consistentwakeup, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Do you have a consistent time you wake up on weekdays?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 11
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q15_consistentbedtimeonweekdays, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Do you have a consistent bedtime on weekdays?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 12
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q49_sleepqualitychangecovid, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Has your sleep quality changed due to the COVID-19 pandemic?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 13
g<- ggplot(analysisdata) +
geom_bar(aes(x=bedtimeroutine, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "My bedtime routine includes") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 14
g<-ggplot(analysisdata) +
geom_bar(aes(x=Q17_stressedaboutschool, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "How stressed do you currently feel about school?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 2 rows containing non-finite values (stat_count).
Fig 15
g<- ggplot(analysisdata) +
geom_bar(aes(x=cantsleepfeeling, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "When you can't sleep do you feel") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 16
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q18_howoftenpracticemindfullness, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "How often do you practice mindfulness techniques? (i.e. breathing exercises, meditation, etc.,") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 17
g<- ggplot(analysisdata) +
geom_bar(aes(x=behaviors, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Which of the following behaviors do you participate in? Check all that apply. ") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 18
g<-ggplot(analysisdata) +
geom_bar(aes(x=Q44_1_thingsidointhelasthourbeforesleepaffectthequalityofmysleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "The things I do in the last hour before bed affect the quality of my sleep.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_2_gettingagoodnightssleepisimportantome, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Getting a good night's sleep is important to me.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_3_mostofmyfriendshaveahealthysleeproutine, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Most of my friends have a healthy sleep routine.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_4_lackofsleepaffectsmyacademicperformance, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Lack of sleep affects my academic performance.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_5_havingaregularsleeproutineimprovesmentalclariy, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Having a regular sleep routine improves mental clarity/sharpness.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_6_ifeelpositiveaboutthequalityofmysleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I feel positive about the quality of my sleep.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_7_ithinkcuttingoutscreenuseonehourbeforesleepleadstobettersleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I think cutting out screen use 1 hour before bed leads to better sleep.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<-ggplot(analysisdata) +
geom_bar(aes(x=Q44_8_ithinkingworkingoutregularlyleadstobettersleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I think working out regularly leads to better sleep.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_9_ithinkmeditatingbeforesleephelpsquality, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I think meditating before bed helps sleep quality.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 19
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q59_1_icanmaintainhealthysleephabits, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can maintain healthy sleep habits.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q59_2_icancutoutscreenuseonehourbeforesleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can cut out screen use 1 hour before bed.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g <- ggplot(analysisdata) +
geom_bar(aes(x=Q59_3_icanworkoutregularly, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can work out regularly.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q59_4_icanmediatebeforebed, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can meditate before bed.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 20
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_1_energyfordailyacitivites, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Energy for daily activities") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 1 rows containing non-finite values (stat_count).
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_2_attractivness, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Attractiveness (to self & others)") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 1 rows containing non-finite values (stat_count).
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q50_3_productivity, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Productivity at work/school") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 1 rows containing non-finite values (stat_count).
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_4_accomplishmentofotherdailygoals, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Accomplishment of other daily goals (e.g. exercise, cooking, paying bills, etc)") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 1 rows containing non-finite values (stat_count).
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q50_5_mentalandemotionalwellbeing, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Mental and emotional wellbeing") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 2 rows containing non-finite values (stat_count).
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_6_fosteringmaintaingrelationships, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Fostering/maintaining relationships") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 2 rows containing non-finite values (stat_count).
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_7_caringforchildren, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Caring for children") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 8 rows containing non-finite values (stat_count).
Fig 21
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q59_1_icanmaintainhealthysleephabits, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can maintain healthy sleep habits.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g <- ggplot(analysisdata) +
geom_bar(aes(x=Q59_2_icancutoutscreenuseonehourbeforesleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can cut out screen use 1 hour before bed.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<-ggplot(analysisdata) +
geom_bar(aes(x=Q59_3_icanworkoutregularly, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can work out regularly.") +
xlab("") +
labs(fill='')
g + scale_fill_lancet() g <-ggplot(analysisdata) +
geom_bar(aes(x=Q59_4_icanmediatebeforebed, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can meditate before bed.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 22
g<-ggplot(analysisdata) +
geom_bar(aes(x=information, fill=compositeoutcomegoodsleep)) +
theme_test() +
theme(text = element_text(size=20), axis.text.x = element_text(size=16)) +
labs(title = "Where have you seen or received information about sleep quality or sleep hygiene? Check all that apply. ") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet()